<template>
    <Modal
        v-model="modal"
        :title="content.title"
        v-if="content.type != -1"
        >
        {{content.text}}
    </Modal>
</template>

<script>
export default {
    data() {
        return {
            modal: false
        }
    },
    props: {
        modal_props: {
            type: Boolean,
            default: false
        },
        content: {
            type: Object,
            default: () => {
                return {
                    type: -1
                }
            },
        }
    },
    watch: {
        modal_props(v) {
            this.modal = v
        },
        modal(v) {
            if (!v) {
                this.$emit("on-change", {
                    modal: false
                })
            }
        }
    }
}

        // @on-ok="ok"
        // @on-cancel="cancel">
</script>

<style>

</style>

